﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework5._9
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入第一个数：");
            double num1 = Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入第二个数：");
            double num2 = Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入第三个数：");
            double num3 = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine($"三个数中最大数为：{ShowDouble(num1, num2, num3)}");
            Console.ReadKey();
        }
        /// <summary>
        /// 求三个数中最大值
        /// </summary>
        /// <param name="number1"></param>
        /// <param name="number2"></param>
        /// <param name="number3"></param>
        /// <returns></returns>
        static double ShowDouble(double number1, double number2, double number3)
        {
            double max1 = Math.Max(number1, number2);
            return Math.Max(max1, number3);
        }
    }
}
